home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / ControlStrip.a < prev    next >
Encoding:
Text File  |  1994-11-11  |  5.9 KB  |  238 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ControlStrip.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__CONTROLSTRIP__') = 'UNDEFINED' THEN
  18. __CONTROLSTRIP__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24. ;        include 'ConditionalMacros.a'                                ;
  25.  
  26.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  27.     include 'Menus.a'
  28.     ENDIF
  29. ;        include 'Memory.a'                                            ;
  30. ;            include 'MixedMode.a'                                    ;
  31. ;        include 'Quickdraw.a'                                        ;
  32. ;            include 'QuickdrawText.a'                                ;
  33. ;        include 'Events.a'                                            ;
  34. ;            include 'OSUtils.a'                                    ;
  35.  
  36.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  37.     include 'Dialogs.a'
  38.     ENDIF
  39. ;        include 'Errors.a'                                            ;
  40. ;        include 'Windows.a'                                        ;
  41. ;            include 'Controls.a'                                    ;
  42. ;        include 'TextEdit.a'                                        ;
  43.  
  44. sdevInitModule                    EQU        0                    ; initialize the module
  45. sdevCloseModule                    EQU        1                    ; clean up before being closed
  46. sdevFeatures                    EQU        2                    ; return feature bits
  47. sdevGetDisplayWidth                EQU        3                    ; returns the width of the module's display
  48. sdevPeriodicTickle                EQU        4                    ; periodic tickle when nothing else is happening
  49. sdevDrawStatus                    EQU        5                    ; update the interface in the Control Strip
  50. sdevMouseClick                    EQU        6                    ; user clicked on the module's display area in the Control Strip
  51. sdevSaveSettings                EQU        7                    ; saved any changed settings in module's preferences file
  52. sdevShowBalloonHelp                EQU        8                    ; puts up a help balloon, if the module has one to display
  53.  
  54. ;********************************************************************************************
  55. ;
  56. ;    Features supported by the module.  If a bit is set, it means that feature is supported.
  57. ;    All undefined bits are reserved for future use by Apple, and should be set to zero.
  58. ;
  59. ;********************************************************************************************
  60. sdevWantMouseClicks                EQU        0                    ; notify the module of mouseDown events
  61. sdevDontAutoTrack                EQU        1                    ; call the module to do mouse tracking
  62. sdevHasCustomHelp                EQU        2                    ; module provides its own help messages
  63. sdevKeepModuleLocked            EQU        3                    ; module needs to be locked in the heap
  64.  
  65. ;********************************************************************************************
  66. ;
  67. ;    Result values returned by the sdevPeriodicTickle and sdevIconMouseClick selectors.
  68. ;    If a bit is set, the module can request that a specific function is performed by
  69. ;    the Control Strip.  A result of zero will do nothing.  All undefined bits are reserved
  70. ;    for future use by Apple, and should be set to zero.
  71. ;
  72. ;********************************************************************************************
  73. sdevResizeDisplay                EQU        0                    ; resize the module's display
  74. sdevNeedToSave                    EQU        1                    ; need to save changed settings, when convenient
  75. sdevHelpStateChange                EQU        2                    ; need to update the help message because of a state change
  76. sdevCloseNow                    EQU        3                    ; close a module because it doesn't want to stay around
  77.  
  78. ;********************************************************************************************
  79. ;
  80. ;    miscellaneous
  81. ;
  82. ;********************************************************************************************
  83. sdevFileType                    EQU        'sdev'
  84.  
  85. sdevMenuItemMark                EQU        '•'
  86.  
  87. ;    direction values for SBDrawBarGraph
  88. BarGraphSlopeLeft                EQU        -1                    ; max end of sloping bar graph is on the left
  89. BarGraphFlatRight                EQU        0                    ; max end of flat bar graph is on the right
  90. BarGraphSlopeRight                EQU        1                    ; max end of sloping bar graph is on the right
  91.  
  92. ;********************************************************************************************
  93. ;
  94. ;    utility routines to provide standard interface elements and support for common functions
  95. ;
  96. ;********************************************************************************************
  97.     IF GENERATING68K THEN
  98.         Macro
  99.         _SBIsControlStripVisible
  100.             moveq    #0,d0
  101.             dc.w     $AAF2
  102.         EndM
  103.     ELSE
  104.         IMPORT    SBIsControlStripVisible
  105.     ENDIF
  106.  
  107.     IF GENERATING68K THEN
  108.         Macro
  109.         _SBShowHideControlStrip
  110.             move.w    #$0101,d0
  111.             dc.w     $AAF2
  112.         EndM
  113.     ELSE
  114.         IMPORT    SBShowHideControlStrip
  115.     ENDIF
  116.  
  117.     IF GENERATING68K THEN
  118.         Macro
  119.         _SBSafeToAccessStartupDisk
  120.             moveq    #2,d0
  121.             dc.w     $AAF2
  122.         EndM
  123.     ELSE
  124.         IMPORT    SBSafeToAccessStartupDisk
  125.     ENDIF
  126.  
  127.     IF GENERATING68K THEN
  128.         Macro
  129.         _SBOpenModuleResourceFile
  130.             move.w    #$0203,d0
  131.             dc.w     $AAF2
  132.         EndM
  133.     ELSE
  134.         IMPORT    SBOpenModuleResourceFile
  135.     ENDIF
  136.  
  137.     IF GENERATING68K THEN
  138.         Macro
  139.         _SBLoadPreferences
  140.             move.w    #$0404,d0
  141.             dc.w     $AAF2
  142.         EndM
  143.     ELSE
  144.         IMPORT    SBLoadPreferences
  145.     ENDIF
  146.  
  147.     IF GENERATING68K THEN
  148.         Macro
  149.         _SBSavePreferences
  150.             move.w    #$0405,d0
  151.             dc.w     $AAF2
  152.         EndM
  153.     ELSE
  154.         IMPORT    SBSavePreferences
  155.     ENDIF
  156.  
  157.     IF GENERATING68K THEN
  158.         Macro
  159.         _SBGetDetachedIndString
  160.             move.w    #$0506,d0
  161.             dc.w     $AAF2
  162.         EndM
  163.     ELSE
  164.         IMPORT    SBGetDetachedIndString
  165.     ENDIF
  166.  
  167.     IF GENERATING68K THEN
  168.         Macro
  169.         _SBGetDetachIconSuite
  170.             move.w    #$0507,d0
  171.             dc.w     $AAF2
  172.         EndM
  173.     ELSE
  174.         IMPORT    SBGetDetachIconSuite
  175.     ENDIF
  176.  
  177.     IF GENERATING68K THEN
  178.         Macro
  179.         _SBTrackPopupMenu
  180.             move.w    #$0408,d0
  181.             dc.w     $AAF2
  182.         EndM
  183.     ELSE
  184.         IMPORT    SBTrackPopupMenu
  185.     ENDIF
  186.  
  187.     IF GENERATING68K THEN
  188.         Macro
  189.         _SBTrackSlider
  190.             move.w    #$0409,d0
  191.             dc.w     $AAF2
  192.         EndM
  193.     ELSE
  194.         IMPORT    SBTrackSlider
  195.     ENDIF
  196.  
  197.     IF GENERATING68K THEN
  198.         Macro
  199.         _SBShowHelpString
  200.             move.w    #$040A,d0
  201.             dc.w     $AAF2
  202.         EndM
  203.     ELSE
  204.         IMPORT    SBShowHelpString
  205.     ENDIF
  206.  
  207.     IF GENERATING68K THEN
  208.         Macro
  209.         _SBGetBarGraphWidth
  210.             move.w    #$010B,d0
  211.             dc.w     $AAF2
  212.         EndM
  213.     ELSE
  214.         IMPORT    SBGetBarGraphWidth
  215.     ENDIF
  216.  
  217.     IF GENERATING68K THEN
  218.         Macro
  219.         _SBDrawBarGraph
  220.             move.w    #$050C,d0
  221.             dc.w     $AAF2
  222.         EndM
  223.     ELSE
  224.         IMPORT    SBDrawBarGraph
  225.     ENDIF
  226.  
  227.     IF GENERATING68K THEN
  228.         Macro
  229.         _SBModalDialogInContext
  230.             move.w    #$040D,d0
  231.             dc.w     $AAF2
  232.         EndM
  233.     ELSE
  234.         IMPORT    SBModalDialogInContext
  235.     ENDIF
  236.  
  237.     ENDIF ; __CONTROLSTRIP__
  238.